<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>分红明细列表</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/static/manager/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/static/manager/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="/static/manager/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/static/manager/css/animate.min.css" rel="stylesheet">
    <link href="/static/manager/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>分红明细</h5>
                    <button class="btn btn-danger btn-xs" onclick="sendMoney()" style="float: right;margin-right: 100px;">一键发放</button>
                </div>
                <div class="ibox-content">

                    <table class="table table-striped table-bordered table-hover dataTables-example">
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>用户名</th>
                            <th>姓名</th>
                            <th>奖金金额</th>
                            <th>奖金名称</th>
                            <th>奖金来源</th>
                            <th>分红时间</th>
                            <th>处理状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='list' id='vo'}
                        <tr class="gradeX">
                            <td>{$vo.detail_id}</td>
                            <td>{$vo.detail_user}</td>
                            <td>{$vo.detail_user_name}</td>
                            <td>{$vo.detail_money}元</td>
                            <td>{$vo.detail_type}</td>
                            <td>{$vo.detail_from}</td>
                            <td>{$vo.detail_time}</td>
                            <td>{$vo.detail_state}</td>
                            <td class="center">
                                <button type="button" class="btn btn-danger btn-xs" onclick="dealmoney({$vo.detail_id})">奖励发放</button>
                            </td>
                        </tr>
                        {/volist}

                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>

</div>
<script src="/static/manager/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/manager/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/static/manager/js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="/static/manager/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="/static/manager/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="/static/manager/js/content.min.js?v=1.0.0"></script>
<script>
    $(document).ready(function() {
        $('.dataTables-example').DataTable();
    } );
    
    function dealmoney(id) {
        if(confirm("确定发放奖励吗？"))
        {
            $.post("/manager/Index/num_deal_money",{id:id},function(result){
                alert(result);
                window.location.reload();
            });
        }
    }

    function sendMoney() {
        if(confirm("确定发放奖励吗？"))
        {
            $.post("/manager/Index/num_send_money",function(result){
                alert(result);
                window.location.reload();
            });
        }
    }

</script>


</body>

</html>